package com.evan.daemon;

/**
 * @author huangzhongliang
 * @time 2023/06/02 19:43
 */
public class KnowThreadDemo {
    public static void main(String[] args) {
        Thread knowThreadNameThread = new Thread(() -> {
            System.out.println(Thread.currentThread().getName() + ":" + Thread.currentThread().isDaemon());
            while (Boolean.TRUE) {
            }
        }, "knowThreadName");

        knowThreadNameThread.setDaemon(Boolean.TRUE);
        knowThreadNameThread.start();
        //Thread.State.WAITING
        System.out.println(Thread.currentThread().getName() + "主over");
    }
}
